home *** CD-ROM | disk | FTP | other *** search
/ Java for 3D & VRML Worlds / Java for 3d and VRML Worlds.iso / examples / chap04 / FloatingAgent.wrl < prev    next >
Text File  |  1996-10-14  |  540b  |  28 lines

  1. #VRML V2.0 utf8
  2.  
  3. #
  4. # an agent is floating randomly.
  5. #
  6.  
  7. DEF AGENT_TIME TimeSensor{
  8.         loop TRUE
  9.         cycleInterval 0.1
  10. }
  11.  
  12. # floating agent
  13. DEF AGENT Transform{
  14.         children[
  15.         # a model of agent.
  16.         Inline{url "ManDetailed.wrl"}
  17.         ]
  18. }
  19.  
  20. DEF AGENT_SCRIPT Script{
  21.         url "FloatingAgent.class"
  22.         eventIn SFTime interval
  23.         eventOut SFVec3f setAgentPosition
  24. }
  25.  
  26. ROUTE AGENT_TIME.cycleTime TO AGENT_SCRIPT.interval
  27. ROUTE AGENT_SCRIPT.setAgentPosition TO AGENT.set_translation
  28.